
//
//  BFDetailFlowLayout.m
//  beifang
//
//  Created by Apple on 17/4/12.
//  Copyright © 2017年 郭凯. All rights reserved.
//

#import "BFDetailFlowLayout.h"

@implementation BFDetailFlowLayout
-(void)prepareLayout{
    [super prepareLayout];
    CGFloat width = self.collectionView.frame.size.width/3;
    NSLog(@"width = %lf",width);
    CGFloat height = 80;
    self.itemSize = CGSizeMake(width, height);
    CGFloat margin = (self.collectionView.frame.size.height-49-3*height)/4.0;
    NSLog(@"margin = %lf  height = %lf",margin,self.collectionView.frame.size.height);
    self.collectionView.contentInset = UIEdgeInsetsMake(margin, 0, margin+49, 0);
    self.minimumLineSpacing = margin;
    self.minimumInteritemSpacing = 0;
}
@end
